package cn.ittaoli.szdz.controller;

import cn.ittaoli.szdz.model.Admin;
import cn.ittaoli.szdz.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by lub_lenovo on 2017/8/15.
 */
@Controller
@RequestMapping("/admin")
public class AdminController {
    @Autowired
    private AdminService adminService;

    @RequestMapping("/lists")
    @ResponseBody
    public List<Admin> lists(){
        List<Admin> admins=adminService.selectAll();
        return admins;
    }

}
